package leistungsbewertung;


public class Starter implements Runnable {

	private EventChain eventChain;
	public static long time; // KRISCH KOTZEN
	public Bib bib;
	Thread mythread;

	public Starter(long time) {
		bib = new Bib();
		this.time = time;
		// Clock clock = new Clock();
		// clock.start();
		mythread = new Thread(this, "bla");
		mythread.start();

		// tictoc();
		init();

	}

	// ***************************************INITIALISIERUNGEN**********************************//
	// private void tictoc() {
	// SwingUtilities.invokeLater(new Runnable() {
	//
	// @Override
	// public void run() {
	//
	//
	// }
	// });

	// }

	private void init() {

		this.eventChain = new EventChain();
		this.eventChain.addEvent(new Event(true));
		this.eventChain.addEvent(new Event(true));
		this.eventChain.addEvent(new Event(true));

	}

	// ********************************METHODEN*******************************************//

	// *********************************MAIN*****************************************//
	public static void main(String[] args) {
		/** Starter s= **/
		new Starter(0);
	}

	@Override
	public void run() {
		while (true) {
			try {
				Thread.sleep(1000);
				Starter.time += Bib.tic;
				
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
			System.out.println(Starter.time);
		}
	}

}
